# import tkinter
# import tkinter.messagebox


# def main():
#     flag = True

#     # 修改标签上的文字
#     def change_label_text():
#         nonlocal flag
#         flag = not flag
#         color, msg = ('red', 'Hello, world!')\
#             if flag else ('blue', 'Goodbye, world!')
#         label.config(text=msg, fg=color)

#     # 确认退出
#     def confirm_to_quit():
#         if tkinter.messagebox.askokcancel('温馨提示', '确定要退出吗?'):
#             top.quit()

#     # 创建顶层窗口
#     top = tkinter.Tk()
#     # 设置窗口大小
#     top.geometry('240x160')
#     # 设置窗口标题
#     top.title('小游戏')
#     # 创建标签对象并添加到顶层窗口
#     label = tkinter.Label(top, text='Hello, world!', font='Arial -32', fg='red')
#     label.pack(expand=1)
#     # 创建一个装按钮的容器
#     panel = tkinter.Frame(top)
#     # 创建按钮对象 指定添加到哪个容器中 通过command参数绑定事件回调函数
#     button1 = tkinter.Button(panel, text='修改', command=change_label_text)
#     button1.pack(side='left')
#     button2 = tkinter.Button(panel, text='退出', command=confirm_to_quit)
#     button2.pack(side='right')
#     panel.pack(side='bottom')
#     # 开启主事件循环
#     tkinter.mainloop()


# if __name__ == '__main__':
#     main()


# for a in range(20):
#   maxb = (100 - (5 * a)) // 3
#   for b in range(0, maxb ):
#     restmoney = 100 - (b * 3) - (a * 5)
#     if restmoney >= 0 and a + b + restmoney * 3 == 100:
#         print('success: ', a, b, restmoney * 3)



# for x in range(0, 100 // 5):
#     for y in range(0, 100 // 3):
#         z = 100 - x - y
#         if 5 * x + 3 * y + z / 3 == 100:
#             print('success: ',x, y, z)

